#include "Dice.h"


Dice::Dice(void)
{
	srand (time(NULL));
}

Dice::~Dice(void)
{
}

void Dice::PrintDice()
{
	ThrowDice();
	switch (value)
	{
	case 1:
		//cout << "hej du fick en 1:a" << endl;

		cout << "-----" << endl;
		cout << "|   |" << endl;
		cout << "| x |" << endl;
		cout << "|   |" << endl;
		cout << "-----" << endl << endl;
		break;
	case 2:
		cout << "-----" << endl;
		cout << "|x  |" << endl;
		cout << "|   |" << endl;
		cout << "|  x|" << endl;
		cout << "-----" << endl << endl;
		break;
	case 3:
		cout << "-----" << endl;
		cout << "|x  |" << endl;
		cout << "| x |" << endl;
		cout << "|  x|" << endl;
		cout << "-----" << endl << endl;
		break;
	case 4:
		cout << "-----" << endl;
		cout << "|x x|" << endl;
		cout << "|   |" << endl;
		cout << "|x x|" << endl;
		cout << "-----" << endl << endl;
		break;
	case 5:
		cout << "-----" << endl;
		cout << "|x x|" << endl;
		cout << "| x |" << endl;
		cout << "|x x|" << endl;
		cout << "-----" << endl << endl;
		break;
	case 6:
		cout << "-----" << endl;
		cout << "|x x|" << endl;
		cout << "|x x|" << endl;
		cout << "|x x|" << endl;
		cout << "-----" << endl << endl;
		break;
	}

}

void Dice::ThrowDice()
{
	value = rand() % 6 + 1;
}